﻿#region Copyright
// Majesty of Omega - The next evolution of macro management space strategy
// 
// Copyright 2007-2009 André Claaßen
// 
// This file is protected by the terms and conditions of the
// Microsoft Community License (Ms-CL 1.1), a copy of which should
// have been distributed along with this software. If not,
// you may find the license information at the following URL:
// 
// http://www.microsoft.com/resources/sharedsource/licensingbasics/communitylicense.mspx
#endregion

using System;
using Majesty_of_Omega.Config;
namespace Majesty_of_Omega.Model.Research
{
    /// <summary>
    /// 
    /// </summary>
    public enum ResearchState
    {
        /// <summary>
        /// 
        /// </summary>
        Unknown,
        /// <summary>
        /// 
        /// </summary>
        Available,
        /// <summary>
        /// 
        /// </summary>
        InResearch,
        /// <summary>
        /// 
        /// </summary>
        Researched
    }

    /// <summary>
    /// This info combines the research state of an tech application with the tech application Info
    /// </summary>
    public class TechApplicationStateInfo
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="TechApplicationStateInfo"/> class.
        /// </summary>
        /// <param name="state">The state.</param>
        /// <param name="application">The application.</param>
        public TechApplicationStateInfo(ResearchState state, TechApplication application)
        {
            this.ResearchState = state;
            this.TechApplication = application;
        }

        /// <summary>
        /// Gets or sets the state of the research.
        /// </summary>
        /// <value>The state of the research.</value>
        public ResearchState ResearchState { get; set; }

        /// <summary>
        /// Gets or sets the tech application.
        /// </summary>
        /// <value>The tech application.</value>
        public TechApplication TechApplication { get; set; }

        /// <summary>
        /// Returns a <see cref="T:System.String"/> that represents the current <see cref="T:System.Object"/>.
        /// </summary>
        /// <returns>
        /// A <see cref="T:System.String"/> that represents the current <see cref="T:System.Object"/>.
        /// </returns>
        public override string ToString()
        {
            return String.Format("{0} ({1})", TechApplication.Name, TechApplication.DefaultTechFieldDependency.TechLevel);
        }
    }
}
